import React, { useState } from 'react';
import CustomPagination from '../../components/CustomPagination';
// import { LeftOutlined, RightOutlined } from '@ant-design/icons';


const Home: React.FC = () => {
  const [page, setPage] = useState(1);
  const [pageSize, setPageSize] = useState(10);
  //setTotal 
  const [total] = useState(100);

  const handlePageChange = (newPage: number) => {
    setPage(newPage);
    // 这里可以添加获取数据的逻辑
  };

  const handlePageSizeChange = (newPageSize: number) => {
    setPageSize(newPageSize);
    setPage(1); // 当页面大小改变时，重置到第一页
    // 这里可以添加获取数据的逻辑
  };

  return (
    <div style={{ padding: '20px' }}>
      <CustomPagination
        current={page}
        pageSize={pageSize}
        total={total}
        onChange={handlePageChange}
        onPageSizeChange={handlePageSizeChange}
        prevIcon={null}
        nextIcon={null}
      />
    </div>
  );
};

export default Home;